//-
// ==========================================================================
// Copyright 2010 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk
// license agreement provided at the time of installation or download,
// or which otherwise accompanies this software in either electronic
// or hard copy form.
// ==========================================================================
//+

///////////////////////////////////////////////////////////////////////////////
//
// apiMeshGeometryOverride.h
//
// Handles vertex data preparation for drawing the user defined shape in
// Viewport 2.0.
//
////////////////////////////////////////////////////////////////////////////////

#include <maya/MPxGeometryOverride.h>

class apiMesh;
class apiMeshGeom;

class apiMeshGeometryOverride : public MHWRender::MPxGeometryOverride
{
public:
	static MPxGeometryOverride* Creator(const MObject& obj)
	{
		return new apiMeshGeometryOverride(obj);
	}

	virtual ~apiMeshGeometryOverride();

	virtual void updateDG();
	virtual void updateRenderItems(
		const MDagPath& path,
		MHWRender::MRenderItemList& list);
	virtual void populateGeometry(
		const MHWRender::MGeometryRequirements& requirements,
		MHWRender::MGeometry& data);
	virtual void cleanUp();

protected:
	apiMeshGeometryOverride(const MObject& obj);

	apiMesh* fMesh;
	apiMeshGeom* fMeshGeom;
};

